﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masterchitiet.master" AutoEventWireup="true" CodeFile="chitietsp.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:DataList ID="DataList1" runat="server" DataKeyField="masp" 
        DataSourceID="SqlDataSource1">
        <ItemTemplate>
        <div class="chitietsp">
            <asp:Image ID="Image1" runat="server" ImageUrl='<%# "~/hinhsanpham/" +Eval("hinh") %>' Width="450px" Height="500px" />
            <br />
            M&atilde; s&#7843;n ph&#7849;m:
            <asp:Label ID="Label1" runat="server" Text='<%# Eval("masp") %>'></asp:Label>
            <br />
            T&ecirc;n s&#7843;n Ph&#7849;m:&nbsp;
            <asp:Label ID="Label2" runat="server" Text='<%# Eval("tensp") %>'></asp:Label>
            <br />
            &#272;&#417;n gi&aacute;:
            <asp:Label ID="Label3" runat="server" Text='<%# Eval("dongia") %>'></asp:Label>
            <br />
            M&ocirc; t&#7843;:
            <asp:Label ID="Label4" runat="server" Text='<%# Eval("mota") %>'></asp:Label>
            <br />
            <asp:HyperLink ID="HyperLink1" runat="server" ImageUrl="~/images/datmua1.gif"
             NavigateUrl='<%#"~/giohang.aspx?Msp=" +Eval("masp") %>'>HyperLink</asp:HyperLink>
             </div>
        </ItemTemplate>
        
    </asp:DataList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
        
        SelectCommand="SELECT sp.masp, sp.tensp, sp.mota, sp.dongia, sp.hinh, dm.madm
        from SanPham sp, DanhMuc dm, NhomSP nsp
        where nsp.manhom=dm.manhom and dm.madm=sp.madm and (sp.masp=@masp) ">
        <SelectParameters>
        <asp:QueryStringParameter Name="masp" QueryStringField="masp" />
        </SelectParameters> </asp:SqlDataSource>
</asp:Content>

